from django.db import models

class ReturnGoods(models.Model):
    photo = models.URLField(max_length=256, blank=True)
    price = models.IntegerField(default=0, blank=True)
    title = models.CharField(max_length=100, blank=True)
    size = models.CharField(max_length=100, blank=True)
    consumer_id = models.IntegerField(default=0, blank=True)
    consumer_name = models.CharField(max_length=100, blank=True)
    consumer_address = models.CharField(max_length=100, blank=True)
    return_time = models.CharField(max_length=100, null=True)
    purchase_number = models.IntegerField(default=1, blank=True)
    purchase_color = models.CharField(max_length=100, blank=True)
    reason = models.TextField(blank=True)

    def __str__(self):
        return self.consumer_name + '-' + self.title

